﻿CREATE PROCEDURE [dbo].[CourseSemester_Select]
	@CourseSemesterId  int = null
	
AS
SELECT        Semester.DisplayName, CourseSemester.Id
FROM            CourseSemester INNER JOIN
                         Semester ON CourseSemester.SemesterId = Semester.Id
WHERE        (CourseSemester.CourseId =
                             (SELECT        CourseSemester_1.CourseId
                                FROM            CourseSemester AS CourseSemester_1 INNER JOIN
                                                         Semester AS Semester_1 ON CourseSemester_1.SemesterId = Semester_1.Id
                                WHERE        (CourseSemester_1.Id = @CourseSemesterId)))